package com.baomidou.springwind.test.IO;

import java.io.*;
import java.util.ArrayList;

/**
 * Created by Administrator on 2017/2/26.
 */
public class FileOutputShortCut {


    public static void main(String[] args) throws IOException {
        ArrayList arrayList = new ArrayList();
        long start = System.currentTimeMillis();
        String filename = "F:\\code\\SpringWind\\SpringWind\\src\\main\\java\\com\\baomidou\\springwind\\test\\IO\\yhx.txt";
        BufferedReader bufferedReader = new BufferedReader(new StringReader(BufferedInputFile.read(filename)));
        PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("F:\\code\\SpringWind\\SpringWind\\src\\main\\java\\com\\baomidou\\springwind\\test\\IO\\abc.txt")));

        String s;
        int i = 1;
        while ((s = bufferedReader.readLine()) != null) {
            out.println((i++) + ":" + s);
        }
        out.close();
        long end = System.currentTimeMillis();
        System.out.println(end - start);
    }

}
